<? 
	global $FullUrl, $lg, $layouts; 
	
?>
<div class="main">
    <div class="template-main">
    <? if ($layouts) { ?>
      <ul>
      <? for ($i = 0; $i < count($layouts); $i++) {
        $layout = $layouts[$i];
        $rs = $layout['img'];
        $img = GetImage($rs);

        $link = GetProductLink2($layout, $lg);
        $w = 225;
        $h = 210;
        $sizes = fixSize($img, $w, $h);
        $sizes_img_true = getimagesize($img);
        //print_r($sizes);

        $url_image = $img;
?>
        <li>
          <div class="item"> <img src="<?= GetPHPThumb($url_image, 225, 210); ?>" 
        alt="<?= $layout["name_" .
$lg] ?>" title="<?= $layout["name_" .
$lg] ?>" style="margin-left:<?= ImageCenterHorizontal($sizes['width']-16,
            210) ?>px" />
            <div class="tooltip_description" style="display:none" title="Item 1 Description"> <img src="http://www.vietseopro.com/<?=$url_image?>" width="350"/> </div>
          </div>
          <div class="short-template">
            <h3><a href="<?= $link ?>" title="<?= $layout["name_" . $lg] ?>" rel="bookmark">
        <?= $layout["name_" . $lg] ?>
        </a></h3>
            <a href="#" class="tooltip" title="<div class='toolstip-chitiet'>Chi tiết của template<br/><b>VSP</b> - 001<br/><b>Loại:</b> Quà Tặng<br/><b>Phong cách:</b> Teen<br/><b>Khuyến Mãi:</b> giảm 20%</div>"> 
            <span class="ms"><b><?=$layout['code']?></b></span> 
            <span class="loai"><b>Loại:</b> Quà Tặng</span> 
            <span class="pc"><b>Phong cách:</b> Teen</span> 
            <span class="code"><?=number_format($layout['price']);?> đ</span> </a>
            <div class="btn-mua"><a title="Xem tiếp" href="<?= $link ?>">Mua</a></div>
          </div>
        </li>
        <? } ?>
        </ul>
  <? } else
    echo '<div style="font-weight:bold; text-align:center; padding:30px; margin:0 auto; ">' .
        NO_NEWS . '</div>';
?>
    </div>
    <div class="clear"></div>    
</div>